<?php

namespace App\Http\Controllers\Api;

use Illuminate\Http\Request;
use App\Models\Social;
use App\Transformers\SocialTransformer;
class SocialsController extends Controller
{
  public function index(Social $social)
  {
    $socials = $social->all();
    // 改为从配置文件读取
    //if (app)
    if (\App::environment('local')) {
        //$socials = config('services.weibo');
    }
    return $this->response->collection($socials, new SocialTransformer());
  }
}
